package com.zr.model;
// Generated 2017-7-3 20:01:15 by Hibernate Tools 4.0.0

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Deliverypoint generated by hbm2java
 */
@Entity
@Table(name = "deliverypoint", catalog = "lms")
public class Deliverypoint implements java.io.Serializable {

	private Integer dpId;
	private Employeeinformation employeeinformation;
	private String dpName;
	private String dpGrade;
	private Set<Distributionscope> distributionscopes = new HashSet<Distributionscope>(0);
	private Set<Distributionprice> distributionpricesForDpIdf = new HashSet<Distributionprice>(0);
	private Set<Employeeinformation> employeeinformations = new HashSet<Employeeinformation>(0);
	private Set<Distributionprice> distributionpricesForDpIds = new HashSet<Distributionprice>(0);
	private Set<Order> ordersForDpIds = new HashSet<Order>(0);
	private Set<Order> ordersForDpIdf = new HashSet<Order>(0);
	private Set<Car> cars = new HashSet<Car>(0);

	public Deliverypoint() {
	}

	public Deliverypoint(Employeeinformation employeeinformation, String dpName, String dpGrade,
			Set<Distributionscope> distributionscopes, Set<Distributionprice> distributionpricesForDpIdf,
			Set<Employeeinformation> employeeinformations, Set<Distributionprice> distributionpricesForDpIds,
			Set<Order> ordersForDpIds, Set<Order> ordersForDpIdf, Set<Car> cars) {
		this.employeeinformation = employeeinformation;
		this.dpName = dpName;
		this.dpGrade = dpGrade;
		this.distributionscopes = distributionscopes;
		this.distributionpricesForDpIdf = distributionpricesForDpIdf;
		this.employeeinformations = employeeinformations;
		this.distributionpricesForDpIds = distributionpricesForDpIds;
		this.ordersForDpIds = ordersForDpIds;
		this.ordersForDpIdf = ordersForDpIdf;
		this.cars = cars;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "dpId", unique = true, nullable = false)
	public Integer getDpId() {
		return this.dpId;
	}

	public void setDpId(Integer dpId) {
		this.dpId = dpId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "eiId")
	public Employeeinformation getEmployeeinformation() {
		return this.employeeinformation;
	}

	public void setEmployeeinformation(Employeeinformation employeeinformation) {
		this.employeeinformation = employeeinformation;
	}

	@Column(name = "dpName")
	public String getDpName() {
		return this.dpName;
	}

	public void setDpName(String dpName) {
		this.dpName = dpName;
	}

	@Column(name = "dpGrade")
	public String getDpGrade() {
		return this.dpGrade;
	}

	public void setDpGrade(String dpGrade) {
		this.dpGrade = dpGrade;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "deliverypoint")
	public Set<Distributionscope> getDistributionscopes() {
		return this.distributionscopes;
	}

	public void setDistributionscopes(Set<Distributionscope> distributionscopes) {
		this.distributionscopes = distributionscopes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "deliverypointByDpIdf")
	public Set<Distributionprice> getDistributionpricesForDpIdf() {
		return this.distributionpricesForDpIdf;
	}

	public void setDistributionpricesForDpIdf(Set<Distributionprice> distributionpricesForDpIdf) {
		this.distributionpricesForDpIdf = distributionpricesForDpIdf;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "deliverypoint")
	public Set<Employeeinformation> getEmployeeinformations() {
		return this.employeeinformations;
	}

	public void setEmployeeinformations(Set<Employeeinformation> employeeinformations) {
		this.employeeinformations = employeeinformations;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "deliverypointByDpIds")
	public Set<Distributionprice> getDistributionpricesForDpIds() {
		return this.distributionpricesForDpIds;
	}

	public void setDistributionpricesForDpIds(Set<Distributionprice> distributionpricesForDpIds) {
		this.distributionpricesForDpIds = distributionpricesForDpIds;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "deliverypointByDpIds")
	public Set<Order> getOrdersForDpIds() {
		return this.ordersForDpIds;
	}

	public void setOrdersForDpIds(Set<Order> ordersForDpIds) {
		this.ordersForDpIds = ordersForDpIds;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "deliverypointByDpIdf")
	public Set<Order> getOrdersForDpIdf() {
		return this.ordersForDpIdf;
	}

	public void setOrdersForDpIdf(Set<Order> ordersForDpIdf) {
		this.ordersForDpIdf = ordersForDpIdf;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "deliverypoint")
	public Set<Car> getCars() {
		return this.cars;
	}

	public void setCars(Set<Car> cars) {
		this.cars = cars;
	}

}
